package com.drifter;

/**
 * Created by Aaron on 8/5/2014.
 */

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;

public class Driver {

    private final Map map;
    private final EntityPlayer player;

    public Driver (Map map, EntityPlayer player) {
        this.map = map;
        this.player = player;
    }

    public void drive(int lastKeypress) {
        // Wait for inputs.
        switch(lastKeypress) {
            case Keys.A: this.player.moveLeft();
                break;
            case Keys.D: this.player.moveRight();
                break;
            case Keys.W: this.player.moveUp();
                break;
            case Keys.S: this.player.moveDown();
            default:
                break;
        }
    }

}
